<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SoupAuth</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="libsoup Reference Manual">
<link rel="up" href="ch02.html" title="Core API">
<link rel="prev" href="ch02.html" title="Core API">
<link rel="next" href="SoupAuthDomain.html" title="SoupAuthDomain">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="ch02.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libsoup Reference Manual</th>
<td><a accesskey="n" href="SoupAuthDomain.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#SoupAuth.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#SoupAuth.description" class="shortcut">Description</a>
                   | 
                  <a href="#SoupAuth.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#SoupAuth.properties" class="shortcut">Properties</a>
                   | 
                  <a href="#SoupAuth.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry">
<a name="SoupAuth"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="SoupAuth.top_of_page"></a>SoupAuth</span></h2>
<p>SoupAuth — HTTP client-side authentication support</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="SoupAuth.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libsoup/soup.h&gt;

                    <a class="link" href="SoupAuth.html#SoupAuth-struct" title="SoupAuth">SoupAuth</a>;
<a class="link" href="SoupAuth.html" title="SoupAuth"><span class="returnvalue">SoupAuth</span></a> *          <a class="link" href="SoupAuth.html#soup-auth-new" title="soup_auth_new ()">soup_auth_new</a>                       (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> *msg</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *auth_header</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="SoupAuth.html#soup-auth-update" title="soup_auth_update ()">soup_auth_update</a>                    (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> *msg</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *auth_header</code></em>);

#define             <a class="link" href="SoupAuth.html#SOUP-TYPE-AUTH-BASIC:CAPS" title="SOUP_TYPE_AUTH_BASIC">SOUP_TYPE_AUTH_BASIC</a>
#define             <a class="link" href="SoupAuth.html#SOUP-TYPE-AUTH-DIGEST:CAPS" title="SOUP_TYPE_AUTH_DIGEST">SOUP_TYPE_AUTH_DIGEST</a>
#define             <a class="link" href="SoupAuth.html#SOUP-TYPE-AUTH-NTLM:CAPS" title="SOUP_TYPE_AUTH_NTLM">SOUP_TYPE_AUTH_NTLM</a>

<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="SoupAuth.html#soup-auth-is-for-proxy" title="soup_auth_is_for_proxy ()">soup_auth_is_for_proxy</a>              (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>);
const <span class="returnvalue">char</span> *        <a class="link" href="SoupAuth.html#soup-auth-get-scheme-name" title="soup_auth_get_scheme_name ()">soup_auth_get_scheme_name</a>           (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>);
const <span class="returnvalue">char</span> *        <a class="link" href="SoupAuth.html#soup-auth-get-host" title="soup_auth_get_host ()">soup_auth_get_host</a>                  (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>);
const <span class="returnvalue">char</span> *        <a class="link" href="SoupAuth.html#soup-auth-get-realm" title="soup_auth_get_realm ()">soup_auth_get_realm</a>                 (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="SoupAuth.html#soup-auth-get-info" title="soup_auth_get_info ()">soup_auth_get_info</a>                  (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>);

<span class="returnvalue">void</span>                <a class="link" href="SoupAuth.html#soup-auth-authenticate" title="soup_auth_authenticate ()">soup_auth_authenticate</a>              (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *username</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *password</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="SoupAuth.html#soup-auth-is-authenticated" title="soup_auth_is_authenticated ()">soup_auth_is_authenticated</a>          (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>);

<span class="returnvalue">char</span> *              <a class="link" href="SoupAuth.html#soup-auth-get-authorization" title="soup_auth_get_authorization ()">soup_auth_get_authorization</a>         (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> *msg</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *            <a class="link" href="SoupAuth.html#soup-auth-get-protection-space" title="soup_auth_get_protection_space ()">soup_auth_get_protection_space</a>      (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupURI.html" title="SoupURI"><span class="type">SoupURI</span></a> *source_uri</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupAuth.html#soup-auth-free-protection-space" title="soup_auth_free_protection_space ()">soup_auth_free_protection_space</a>     (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *space</code></em>);

#define             <a class="link" href="SoupAuth.html#SOUP-AUTH-SCHEME-NAME:CAPS" title="SOUP_AUTH_SCHEME_NAME">SOUP_AUTH_SCHEME_NAME</a>
#define             <a class="link" href="SoupAuth.html#SOUP-AUTH-REALM:CAPS" title="SOUP_AUTH_REALM">SOUP_AUTH_REALM</a>
#define             <a class="link" href="SoupAuth.html#SOUP-AUTH-HOST:CAPS" title="SOUP_AUTH_HOST">SOUP_AUTH_HOST</a>
#define             <a class="link" href="SoupAuth.html#SOUP-AUTH-IS-FOR-PROXY:CAPS" title="SOUP_AUTH_IS_FOR_PROXY">SOUP_AUTH_IS_FOR_PROXY</a>
#define             <a class="link" href="SoupAuth.html#SOUP-AUTH-IS-AUTHENTICATED:CAPS" title="SOUP_AUTH_IS_AUTHENTICATED">SOUP_AUTH_IS_AUTHENTICATED</a>
</pre>
</div>
<div class="refsect1">
<a name="SoupAuth.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----SoupAuth
</pre>
</div>
<div class="refsect1">
<a name="SoupAuth.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="SoupAuth.html#SoupAuth--host" title='The "host" property'>host</a>"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only
  "<a class="link" href="SoupAuth.html#SoupAuth--is-authenticated" title='The "is-authenticated" property'>is-authenticated</a>"         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read
  "<a class="link" href="SoupAuth.html#SoupAuth--is-for-proxy" title='The "is-for-proxy" property'>is-for-proxy</a>"             <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct Only
  "<a class="link" href="SoupAuth.html#SoupAuth--realm" title='The "realm" property'>realm</a>"                    <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only
  "<a class="link" href="SoupAuth.html#SoupAuth--scheme-name" title='The "scheme-name" property'>scheme-name</a>"              <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read
</pre>
</div>
<div class="refsect1">
<a name="SoupAuth.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="SoupAuth.html#SoupAuth-save-password" title='The "save-password" signal'>save-password</a>"                                  : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
</pre>
</div>
<div class="refsect1">
<a name="SoupAuth.description"></a><h2>Description</h2>
<p>
<a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> objects store the authentication data associated with a
given bit of web space. They are created automatically by
<a class="link" href="SoupSession.html" title="SoupSession"><span class="type">SoupSession</span></a>.
</p>
</div>
<div class="refsect1">
<a name="SoupAuth.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="SoupAuth-struct"></a><h3>SoupAuth</h3>
<pre class="programlisting">typedef struct _SoupAuth SoupAuth;</pre>
<p>
The abstract base class for handling authentication. Specific HTTP
Authentication mechanisms are implemented by its subclasses, but
applications never need to be aware of the specific subclasses
being used.
</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-auth-new"></a><h3>soup_auth_new ()</h3>
<pre class="programlisting"><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="returnvalue">SoupAuth</span></a> *          soup_auth_new                       (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> *msg</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *auth_header</code></em>);</pre>
<p>
Creates a new <a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> of type <em class="parameter"><code>type</code></em> with the information from
<em class="parameter"><code>msg</code></em> and <em class="parameter"><code>auth_header</code></em>.
</p>
<p>
This is called by <a class="link" href="SoupSession.html" title="SoupSession"><span class="type">SoupSession</span></a>; you will normally not create auths
yourself.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>the type of auth to create (a subtype of <a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a>)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td>
<td>the <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> the auth is being created for</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>auth_header</code></em> :</span></p></td>
<td>the WWW-Authenticate/Proxy-Authenticate header</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the new <a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if it could not be
created</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-auth-update"></a><h3>soup_auth_update ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            soup_auth_update                    (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> *msg</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *auth_header</code></em>);</pre>
<p>
Updates <em class="parameter"><code>auth</code></em> with the information from <em class="parameter"><code>msg</code></em> and <em class="parameter"><code>auth_header</code></em>,
possibly un-authenticating it. As with <a class="link" href="SoupAuth.html#soup-auth-new" title="soup_auth_new ()"><code class="function">soup_auth_new()</code></a>, this is
normally only used by <a class="link" href="SoupSession.html" title="SoupSession"><span class="type">SoupSession</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>auth</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td>
<td>the <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> <em class="parameter"><code>auth</code></em> is being updated for</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>auth_header</code></em> :</span></p></td>
<td>the WWW-Authenticate/Proxy-Authenticate header</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>auth</code></em> is still a valid (but potentially
unauthenticated) <a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a>. <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if something about <em class="parameter"><code>auth_params</code></em>
could not be parsed or incorporated into <em class="parameter"><code>auth</code></em> at all.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-TYPE-AUTH-BASIC:CAPS"></a><h3>SOUP_TYPE_AUTH_BASIC</h3>
<pre class="programlisting">#define SOUP_TYPE_AUTH_BASIC  (soup_auth_basic_get_type ())
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-TYPE-AUTH-DIGEST:CAPS"></a><h3>SOUP_TYPE_AUTH_DIGEST</h3>
<pre class="programlisting">#define SOUP_TYPE_AUTH_DIGEST (soup_auth_digest_get_type ())
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-TYPE-AUTH-NTLM:CAPS"></a><h3>SOUP_TYPE_AUTH_NTLM</h3>
<pre class="programlisting">#define SOUP_TYPE_AUTH_NTLM   (soup_auth_ntlm_get_type ())
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-auth-is-for-proxy"></a><h3>soup_auth_is_for_proxy ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            soup_auth_is_for_proxy              (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>);</pre>
<p>
Tests whether or not <em class="parameter"><code>auth</code></em> is associated with a proxy server rather
than an "origin" server.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>auth</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-auth-get-scheme-name"></a><h3>soup_auth_get_scheme_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        soup_auth_get_scheme_name           (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>);</pre>
<p>
Returns <em class="parameter"><code>auth</code></em>'s scheme name. (Eg, "Basic", "Digest", or "NTLM")
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>auth</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the scheme name</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-auth-get-host"></a><h3>soup_auth_get_host ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        soup_auth_get_host                  (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>);</pre>
<p>
Returns the host that <em class="parameter"><code>auth</code></em> is associated with.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>auth</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the hostname</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-auth-get-realm"></a><h3>soup_auth_get_realm ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        soup_auth_get_realm                 (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>);</pre>
<p>
Returns <em class="parameter"><code>auth</code></em>'s realm. This is an identifier that distinguishes
separate authentication spaces on a given server, and may be some
string that is meaningful to the user. (Although it is probably not
localized.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>auth</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the realm name</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-auth-get-info"></a><h3>soup_auth_get_info ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              soup_auth_get_info                  (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>);</pre>
<p>
Gets an opaque identifier for <em class="parameter"><code>auth</code></em>, for use as a hash key or the
like. <a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> objects from the same server with the same
identifier refer to the same authentication domain (eg, the URLs
associated with them take the same usernames and passwords).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>auth</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the identifier</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-auth-authenticate"></a><h3>soup_auth_authenticate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_auth_authenticate              (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *username</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *password</code></em>);</pre>
<p>
Call this on an auth to authenticate it; normally this will cause
the auth's message to be requeued with the new authentication info.
</p>
<p>
This does not cause the password to be saved to persistent storage;
see <code class="function">soup_auth_save_password()</code> for that.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>auth</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>username</code></em> :</span></p></td>
<td>the username provided by the user or client</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>password</code></em> :</span></p></td>
<td>the password provided by the user or client</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-auth-is-authenticated"></a><h3>soup_auth_is_authenticated ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            soup_auth_is_authenticated          (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>);</pre>
<p>
Tests if <em class="parameter"><code>auth</code></em> has been given a username and password
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>auth</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>auth</code></em> has been given a username and password</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-auth-get-authorization"></a><h3>soup_auth_get_authorization ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              soup_auth_get_authorization         (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> *msg</code></em>);</pre>
<p>
Generates an appropriate "Authorization" header for <em class="parameter"><code>msg</code></em>. (The
session will only call this if <a class="link" href="SoupAuth.html#soup-auth-is-authenticated" title="soup_auth_is_authenticated ()"><code class="function">soup_auth_is_authenticated()</code></a>
returned <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>auth</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td>
<td>the <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> to be authorized</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the "Authorization" header, which must be freed.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-auth-get-protection-space"></a><h3>soup_auth_get_protection_space ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *            soup_auth_get_protection_space      (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupURI.html" title="SoupURI"><span class="type">SoupURI</span></a> *source_uri</code></em>);</pre>
<p>
Returns a list of paths on the server which <em class="parameter"><code>auth</code></em> extends over.
(All subdirectories of these paths are also assumed to be part
of <em class="parameter"><code>auth</code></em>'s protection space, unless otherwise discovered not to
be.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>auth</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>source_uri</code></em> :</span></p></td>
<td>the URI of the request that <em class="parameter"><code>auth</code></em> was generated in
response to.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the list of
paths, which can be freed with <a class="link" href="SoupAuth.html#soup-auth-free-protection-space" title="soup_auth_free_protection_space ()"><code class="function">soup_auth_free_protection_space()</code></a>. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-auth-free-protection-space"></a><h3>soup_auth_free_protection_space ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_auth_free_protection_space     (<em class="parameter"><code><a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *space</code></em>);</pre>
<p>
Frees <em class="parameter"><code>space</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>auth</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>space</code></em> :</span></p></td>
<td>the return value from <a class="link" href="SoupAuth.html#soup-auth-get-protection-space" title="soup_auth_get_protection_space ()"><code class="function">soup_auth_get_protection_space()</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-AUTH-SCHEME-NAME:CAPS"></a><h3>SOUP_AUTH_SCHEME_NAME</h3>
<pre class="programlisting">#define SOUP_AUTH_SCHEME_NAME      "scheme-name"
</pre>
<p>
An alias for the <a class="link" href="SoupAuth.html#SoupAuth--scheme-name" title='The "scheme-name" property'><span class="type">"scheme-name"</span></a> property. (The
authentication scheme name.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-AUTH-REALM:CAPS"></a><h3>SOUP_AUTH_REALM</h3>
<pre class="programlisting">#define SOUP_AUTH_REALM            "realm"
</pre>
<p>
An alias for the <a class="link" href="SoupAuth.html#SoupAuth--realm" title='The "realm" property'><span class="type">"realm"</span></a> property. (The
authentication realm.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-AUTH-HOST:CAPS"></a><h3>SOUP_AUTH_HOST</h3>
<pre class="programlisting">#define SOUP_AUTH_HOST             "host"
</pre>
<p>
An alias for the <a class="link" href="SoupAuth.html#SoupAuth--host" title='The "host" property'><span class="type">"host"</span></a> property. (The
host being authenticated to.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-AUTH-IS-FOR-PROXY:CAPS"></a><h3>SOUP_AUTH_IS_FOR_PROXY</h3>
<pre class="programlisting">#define SOUP_AUTH_IS_FOR_PROXY     "is-for-proxy"
</pre>
<p>
An alias for the <a class="link" href="SoupAuth.html#SoupAuth--is-for-proxy" title='The "is-for-proxy" property'><span class="type">"is-for-proxy"</span></a> property. (Whether
or not the auth is for a proxy server.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-AUTH-IS-AUTHENTICATED:CAPS"></a><h3>SOUP_AUTH_IS_AUTHENTICATED</h3>
<pre class="programlisting">#define SOUP_AUTH_IS_AUTHENTICATED "is-authenticated"
</pre>
<p>
An alias for the <a class="link" href="SoupAuth.html#SoupAuth--is-authenticated" title='The "is-authenticated" property'><span class="type">"is-authenticated"</span></a> property.
(Whether or not the auth has been authenticated.)
</p>
</div>
</div>
<div class="refsect1">
<a name="SoupAuth.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="SoupAuth--host"></a><h3>The <code class="literal">"host"</code> property</h3>
<pre class="programlisting">  "host"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only</pre>
<p>Authentication host.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupAuth--is-authenticated"></a><h3>The <code class="literal">"is-authenticated"</code> property</h3>
<pre class="programlisting">  "is-authenticated"         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read</pre>
<p>Whether or not the auth is authenticated.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupAuth--is-for-proxy"></a><h3>The <code class="literal">"is-for-proxy"</code> property</h3>
<pre class="programlisting">  "is-for-proxy"             <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct Only</pre>
<p>Whether or not the auth is for a proxy server.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupAuth--realm"></a><h3>The <code class="literal">"realm"</code> property</h3>
<pre class="programlisting">  "realm"                    <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only</pre>
<p>Authentication realm.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupAuth--scheme-name"></a><h3>The <code class="literal">"scheme-name"</code> property</h3>
<pre class="programlisting">  "scheme-name"              <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read</pre>
<p>Authentication scheme name.</p>
<p>Default value: NULL</p>
</div>
</div>
<div class="refsect1">
<a name="SoupAuth.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="SoupAuth-save-password"></a><h3>The <code class="literal">"save-password"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="SoupAuth.html" title="SoupAuth"><span class="type">SoupAuth</span></a> *auth,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>    *username,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>    *password,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>  user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
<p>
Emitted to request that the <em class="parameter"><code>username</code></em>/<em class="parameter"><code>password</code></em> pair be
saved. If the session supports password-saving, it will
connect to this signal before emitting
<a class="link" href="SoupSession.html#SoupSession-authenticate" title='The "authenticate" signal'><span class="type">"authenticate"</span></a>, so that it record the password
if requested by the caller.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>auth</code></em> :</span></p></td>
<td>the auth</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>username</code></em> :</span></p></td>
<td>the username to save</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>password</code></em> :</span></p></td>
<td>the password to save</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.28</p>
</div>
</div>
<div class="refsect1">
<a name="SoupAuth.see-also"></a><h2>See Also</h2>
<a class="link" href="SoupSession.html" title="SoupSession"><span class="type">SoupSession</span></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>